import maya.cmds as mc
TemLocName=['arm01_templeLoc','arm02_templeLoc','arm03_templeLoc']
TemUpLocName=['arm01_up_templeLoc','arm02_up_templeLoc','arm03_up_templeLoc']
for tul in TemUpLocName:
    mc.spaceLocator(n=tul)

for tl in TemLocName:
    mc.spaceLocator(n=tl)
    jntName=str(tl).replace('templeLoc','curveJnt')
    mc.select(cl=True)
    mc.joint(n=jntName)
    mc.parent(jntName,tl)
    
mc.move(-6,0,0,'arm01_templeLoc')
mc.move(0,0,0,'arm02_templeLoc')
mc.move(6,0,0,'arm03_templeLoc')

mc.move(-6,3,0,'arm01_up_templeLoc')
mc.move(0,3,0,'arm02_up_templeLoc')
mc.move(6,3,0,'arm03_up_templeLoc')

mc.curve(p=[(-6, 0, 0), (0, 0, 0)],n='Arm_curve',d=1)
mc.curve(p=[(0, 0, 0), (6, 0, 0)],n='frontArm_curve',d=1)

mc.skinCluster('arm01_curveJnt','arm02_curveJnt','Arm_curve',tsb=True,sw=True,nw=True)
mc.skinCluster('arm01_curveJnt','arm02_curveJnt','frontArm_curve',tsb=True,sw=True,nw=True)

mc.aimConstraint()
